package com.uyayo.blog.service;

import com.uyayo.blog.entity.BlogCategory;
import com.uyayo.blog.model.BlogCategoryCondition;
import com.uyayo.framework.common.exception.ParentNotFoundException;
import com.uyayo.framework.core.service.IBaseService;

import java.util.List;

public interface BlogCategoryService extends IBaseService<BlogCategory>{

	List<BlogCategory> selectBlogCategory(BlogCategoryCondition blogCategoryCondition);

	/**
	 * 根据上级Id获取记录数
	 * @param parentId 上级id
	 * @return int
	 */
	int selectCountByParentId(Long parentId);

	int saveBlogCategory(BlogCategory blogCategory) throws ParentNotFoundException;

	int updateBlogCategory(BlogCategory blogCategory) throws ParentNotFoundException;

	int deleteBlogCategory(Long id);
}
